package com.ogawa.projectcommon.bean;

import java.io.Serializable;


/*
保存用户登录信息
 */
public class ProjectUserInfoBean implements Serializable {

    boolean isVisitor = false;//是否是游客

    private UserBean user;
    private String token = "";//登录token
    private String loginType = "";
    private boolean firstLogin;//是否第一次登录
    private Object userInfo;
    private Object region;
    private String img;//用户头像的base64编码

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public boolean isVisitor() {
        return isVisitor;
    }

    public void setVisitor(boolean visitor) {
        isVisitor = visitor;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getLoginType() {
        return loginType;
    }

    public void setLoginType(String loginType) {
        this.loginType = loginType;
    }

    public boolean isFirstLogin() {
        return firstLogin;
    }

    public void setFirstLogin(boolean firstLogin) {
        this.firstLogin = firstLogin;
    }

    public Object getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(Object userInfo) {
        this.userInfo = userInfo;
    }

    public Object getRegion() {
        return region;
    }

    public void setRegion(Object region) {
        this.region = region;
    }

    public static class UserBean implements Serializable{
        /**
         * id : 900
         * userName : 15359349628
         * mobile : 15359349628
         * email : null
         * platform : healthPlatform
         */

        private String id;//id
        private String userName;//用户名
        private String mobile;//手机
        private String email;//email
        private String platform;//用户来源

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getUserName() {
            return userName;
        }

        public void setUserName(String userName) {
            this.userName = userName;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        public String getEmail() {
            return email;
        }

        public void setEmail(String email) {
            this.email = email;
        }

        public String getPlatform() {
            return platform;
        }

        public void setPlatform(String platform) {
            this.platform = platform;
        }

        @Override
        public String toString() {
            return "UserBean{" +
                    "id=" + id +
                    ", userName='" + userName + '\'' +
                    ", mobile='" + mobile + '\'' +
                    ", email=" + email +
                    ", platform='" + platform + '\'' +
                    '}';
        }
    }


    @Override
    public String toString() {
        return "UserInfoBean{" +
                "user=" + user +
                ", token='" + token + '\'' +
                ", loginType='" + loginType + '\'' +
                ", firstLogin=" + firstLogin +
                ", userInfo=" + userInfo +
                ", region=" + region +
                '}';
    }
}
